<!doctype html>
<html>
<head>
  <title></title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <meta http-equiv="Pragma" content="no-cache"/>
  <meta http-equiv="Cache-Control" content="no-cache, must-revalidate"/>
  <meta http-equiv="Expires" content="0"/>
  <script>
    document.write("<link type='text/css' href='../demo.css?version=" + new Date().getTime() + "' rel='stylesheet' />");
  </script>
  <script src="../jquery-1.7.1.min.js"></script>
</head>
<body onload="init_preview();" style="
overflow: hidden;
">
<div class="left_window">
  <div id="divPlugin" class="plugin"></div>
  <div onclick="if_show()" class="click_area" style="width: 100px;height: 100px;cursor:pointer;"></div>
  <fieldset class="login" id="login">
    <legend>登录</legend>
    <table>
      <tr>
        <td class="tt">IP地址</td>
        <td><input id="loginip" type="text" class="txt" value="192.168.10.11"/></td>
        <td class="tt">端口号</td>
        <td><input id="port" type="text" class="txt" value="80"/></td>
      </tr>
      <tr>
        <td class="tt">用户名</td>
        <td><input id="username" type="text" class="txt" value="admin"/></td>
        <td class="tt">密码</td>
        <td><input id="password" type="password" class="txt" value="qwer123456"/></td>
      </tr>
      <tr>
        <td class="tt">设备端口</td>
        <td colspan="2"><input id="deviceport" type="text" class="txt"/>（可选参数）</td>
        <td>
          窗口分割数&nbsp;
          <select class="sel2" onchange="changeWndNum(this.value);">
            <option value="1" selected>1x1</option>
            <option value="2">2x2</option>
            <option value="3">3x3</option>
            <option value="4">4x4</option>
          </select>
        </td>
      </tr>
      <tr>
        <td class="tt">RTSP端口</td>
        <td colspan="3"><input id="rtspport" type="text" class="txt"/>（可选参数）</td>
      </tr>
      <tr>
        <td colspan="4">
          <input id="cLogin" type="button" class="btn" value="登录" onclick="clickLogin();"/>
          <input type="button" class="btn" value="退出" onclick="clickLogout();"/>
<!--          <input type="button" class="btn2" value="获取基本信息" onclick="clickGetDeviceInfo();"/>-->
        </td>
      </tr>
      <tr>
        <td class="tt">已登录设备</td>
        <td>
          <select id="ip" class="sel" onchange="getChannelInfo();getDevicePort();"></select>
        </td>
        <td class="tt">通道列表</td>
        <td>
          <select id="channels" class="sel"></select>
        </td>
      </tr>
      <tr>
        <td>
          <input type="button" class="btn2" value="开始预览" onclick="clickStartRealPlay();"/>
        </td>
        <td>
          <input type="button" class="btn2" value="停止预览" onclick="clickStopRealPlay();"/>
        </td>
        <td>
          <input type="button" class="btn2" value="设置文本叠加" onclick="setTextOverlay();"/>
        </td>
      </tr>
      <tr>
        <td class="tt">码流类型</td>
        <td>
          <select id="streamtype" class="sel">
            <option value="1">主码流</option>
            <option value="2">子码流</option>
            <option value="3">第三码流</option>
            <option value="4">转码码流</option>
          </select>
        </td>
      </tr>
      <tr>
        <td colspan="3">
          <input type="button" class="btn2" value="启用电子放大" onclick="clickEnableEZoom();"/>
          <input type="button" class="btn2" value="禁用电子放大" onclick="clickDisableEZoom();"/>
          <input type="button" class="btn2" value="启用3D放大" onclick="clickEnable3DZoom();"/>
          <input type="button" class="btn2" value="禁用3D放大" onclick="clickDisable3DZoom();"/>
          <input id="fullbtn" type="button" class="btn" value="全屏" onclick="clickFullScreen();"/>
        </td>
      </tr>
    </table>
  </fieldset>
</div>


</body>
<script id="videonode" src="../codebase/webVideoCtrl.js"></script>
<script src="demo.js"></script>
<script type="text/javascript">
  function init_preview(){
    setTimeout(function () {
      clickLogin();
      setTimeout(function () {
        clickStartRealPlay();
      }, 2000);
    }, 1000);
  }
  function if_show(){
      var showing = document.getElementById("login");
      if (showing.style.display==="none"){
        showing.style.display = "block";
      }else{
        showing.style.display = "none";
      }
  }
</script>
</html>
